package javabasics.netty.login.client.handler;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import javabasics.netty.login.protocol.response.LogoutResponsePacket;
import javabasics.netty.login.util.SessionUtil;

/**
 * @Author suxiaoxiao
 * @Date 2019/9/19 23:15
 * @Version 1.0
 */
public class LogoutResponseHandler extends SimpleChannelInboundHandler<LogoutResponsePacket> {
    @Override
    protected void channelRead0(ChannelHandlerContext ctx, LogoutResponsePacket msg) {
        SessionUtil.unBindSession(ctx.channel());
    }
}
